package edu.ilstu.mind.ise.ccp.impl.queued;

import edu.ilstu.mind.ise.ccp.message.Message;
import edu.ilstu.mind.ise.ccp.message.MessageSender;

class QueuedMessageSender implements MessageSender {
	private final QueuedMessageRouter messageRouter;

	public QueuedMessageSender(QueuedMessageRouter messageRouter) {
		this.messageRouter = messageRouter;
	}

	@Override
	public void sendMessage(Message message) {
		// create the message and enqueue it in the message router
		// TODO message pool
		messageRouter.enqueue(message);
	}
}